package cn.exrick.xboot.modules.ApprovalInfo.entity;

import cn.exrick.xboot.base.XbootBaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * @author njp
 */
@Data
@Entity
@Table(name = "t_approval_info")
@TableName("t_approval_info")
@ApiModel(value = "审批信息表")
public class ApprovalInfo extends XbootBaseEntity {

    private static final long serialVersionUID = 1L;

   /* @ApiModelProperty(value = "身份证号")
    private String userCode;
    @ApiModelProperty(value = "审批申请人姓名")
    private String name;
    @ApiModelProperty(value = "描述")
    private String description;*/
    @ApiModelProperty(value = "审批状态：\n" +
            "1：批准\n" +
            "2：未批准\n" +
            "3：未审批"+
            "4:超时")
    private Integer approvalStatus;
    @CreatedDate
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "审批信息过期时间")
    private Date expirationTime;
    @ApiModelProperty(value = "审批员ID")
    private String assessorId;

    @ApiModelProperty(value = "用户名")
    private String username;

    @ApiModelProperty(value = "审批内容")
    private String msg;

    /**
     * njp
     * add  20191014 begin
     */
    @ApiModelProperty(value = "管理员标识:eg:admin+UUID（随机标识）")
    private String adminCode;
    @CreatedDate
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "审批处理的时间")
    private Date approvalTime;
    /**
     * njp
     * add  20191014 end
     */

    /**
     * 非数据库字段 begin
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "当前时间")
    private transient Date nowTime;


    /**
     * 非数据库字段 end
     */
}